New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QPACK security considerations #3575
Conversation
Behold Fixes: 1737
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. But then I'm not impartial in this.
An informative reference to HPACK might be wise. Otherwise people might get an unexplained sense of déjà vu.
draft-ietf-quic-qpack.md
Outdated
|
||
Note: | ||
|
||
Padding schemes only provide limited protection against an attacker with these |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Padding schemes only provide limited protection against an attacker with these | |
: Padding schemes only provide limited protection against an attacker with these |
draft-ietf-quic-qpack.md
Outdated
table are attributed to an entity, and only the entity that created a particular | ||
value can extract that value. | ||
|
||
To improve compression performance of tqhis option, certain entries might be tagged as being public. For example, a web browser might make the values of the Accept-Encoding header field available in all requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve compression performance of tqhis option, certain entries might be tagged as being public. For example, a web browser might make the values of the Accept-Encoding header field available in all requests. | |
To improve compression performance of this option, certain entries might be | |
tagged as being public. For example, a web browser might make the values of the | |
Accept-Encoding header field available in all requests. |
draft-ietf-quic-qpack.md
Outdated
|
||
Note: | ||
|
||
Simply removing entries corresponding to the header field from the dynamic table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply removing entries corresponding to the header field from the dynamic table | |
: Simply removing entries corresponding to the header field from the dynamic table |
draft-ietf-quic-qpack.md
Outdated
that a large number of attempts to guess a header field value results in the | ||
header field no more being compared to the dynamic table entries in future | ||
messages, effectively preventing further guesses. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that a large number of attempts to guess a header field value results in the | |
header field no more being compared to the dynamic table entries in future | |
messages, effectively preventing further guesses. | |
that a large number of attempts to guess a header field value results in the | |
header field not being compared to the dynamic table entries in future | |
messages, effectively preventing further guesses. |
I had a little trouble with "no more".
draft-ietf-quic-qpack.md
Outdated
field value. Marking a header field as not using the dynamic table any more | ||
might occur for shorter values more quickly or with higher probability than for | ||
longer values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
field value. Marking a header field as not using the dynamic table any more | |
might occur for shorter values more quickly or with higher probability than for | |
longer values. | |
field value. Disabling access to the dynamic table for a header field might | |
occur for shorter values more quickly or with higher probability than for longer | |
values. |
draft-ietf-quic-qpack.md
Outdated
Note that these criteria for deciding to use a never indexed literal | ||
representation will evolve over time as new attacks are discovered. | ||
|
||
##. Static Huffman Encoding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
##. Static Huffman Encoding | |
## Static Huffman Encoding |
draft-ietf-quic-qpack.md
Outdated
designed to limit both the peak and state amounts of memory allocated by an | ||
endpoint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
designed to limit both the peak and state amounts of memory allocated by an | |
endpoint. | |
designed to limit both the peak and stable amounts of memory allocated by an | |
endpoint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error is in the HPACK RFC. Is it worth an errata?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let you manage that :) You can be the author of an RFC erratum. The glory!
draft-ietf-quic-qpack.md
Outdated
QPACK through the definition of the maximum size of the dynamic table, and the | ||
maximum number of blocking streams. In HTTP/3, these values are controlled by | ||
the decoder through the setting parameter QPACK_MAX_TABLE_CAPACITY and | ||
QPACK_BLOCKED_STREAMS, respectively (see Section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QPACK_BLOCKED_STREAMS, respectively (see Section | |
QPACK_BLOCKED_STREAMS, respectively (see |
draft-ietf-quic-qpack.md
Outdated
HTTP/3, this is realized by setting an appropriate value for the | ||
QPACK_MAX_TABLE_CAPACITY parameter. An encoder can limit the amount of state | ||
memory it uses by signaling lower dynamic table size than the decoder allows | ||
(see {{eviction}}). A decoder can limit the amount of state memory used for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(see {{eviction}}). A decoder can limit the amount of state memory used for | |
(see {{eviction}}). | |
A decoder can limit the amount of state memory used for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm modulo some nits
draft-ietf-quic-qpack.md
Outdated
recovered successfully. However, values with low entropy remain vulnerable. | ||
|
||
Attacks of this nature are possible any time that two mutually distrustful | ||
entities control requests or responses that are placed onto a single HTTP/2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entities control requests or responses that are placed onto a single HTTP/2 | |
entities control requests or responses that are placed onto a single HTTP/3 |
draft-ietf-quic-qpack.md
Outdated
A decoder can limit the amount of state memory used for the dynamic table by | ||
setting an appropriate value for the maximum size of the dynamic table. In | ||
HTTP/3, this is realized by setting an appropriate value for the | ||
QPACK_MAX_TABLE_CAPACITY parameter. An encoder can limit the amount of state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the doc is inconsistent about QPACK_MAX_TABLE_CAPACITY vs SETTINGS_QPACK_MAX_TABLE_CAPACITY. I don't know what the answer is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text seems to consistently use SETTINGS_ variants, but the table omits it. I'll fix these to match the text, but SETTINGS_ seems redundant in the table. I'll resolve the inconsistency in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wfm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an (unstated) norm to omit SETTINGS_ in cases where it's already blatantly obvious that we're discussing a setting. You'll find similar variance in 7540, 7541, and HTTP/3.
draft-ietf-quic-qpack.md
Outdated
setting an appropriate value for the maximum size of the dynamic table. In | ||
HTTP/3, this is realized by setting an appropriate value for the | ||
QPACK_MAX_TABLE_CAPACITY parameter. An encoder can limit the amount of state | ||
memory it uses by signaling lower dynamic table size than the decoder allows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
memory it uses by signaling lower dynamic table size than the decoder allows | |
memory it uses by signaling a lower dynamic table size than the decoder allows |
draft-ietf-quic-qpack.md
Outdated
(see {{eviction}}). A decoder can limit the amount of state memory used for | ||
blocked streams by setting an appropriate value for the maximum number of | ||
blocked streams. In HTTP/3, this is realized by setting an appropriate value | ||
for the QPACK_BLOCKED_STREAMS parameter. An encoder can limit the amount of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: QPACK_BLOCKED_STREAMS vs. SETTINGS_QPACK_BLOCKED_STREAMS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good (and familiar); some minor nits.
An implementation has to set a limit for the values it accepts for integers, as | ||
well as for the encoded length (see {{prefixed-integers}}). In the same way, it | ||
has to set a limit to the length it accepts for string literals (see | ||
{{string-literals}}). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we have a minimum size which MUST be supported; should that be mentioned here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikeBishop : I can't quite figure an elegant way to mention the minimum here. It is already mentioned in the referenced section.
draft-ietf-quic-qpack.md
Outdated
SETTINGS_QPACK_BLOCKED_STREAMS, respectively (see | ||
{{maximum-dynamic-table-capacity}} and {{blocked-streams}}). The limit on the | ||
size of the dynamic table takes into account both the size of the data stored in | ||
the dynamic table, plus a small allowance for overhead. The limit on the number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"both" does not flow well with "plus". Either s/", plus"/" and"/, or remove "both".
@afrind I think this is inches of getting landed |
Feedback from Mike Co-authored-by: Mike Bishop <mbishop@evequefou.be>
Behold
Fixes #1737